import React, { memo } from 'react'
import Icketang from './组件的插槽的使用/Icketang'
import Info from './组件的插槽的使用/Info'
import Loading from './组件的插槽的使用/Loading'
import HookDemo from './自定义Hook/HookDemo'
import UseContextDemo from './useContext/UseContextDemo'

const Demo = memo((props) => {
  return (
    <div>
      <h1>我是demo </h1>
      <hr />
      我是分割线
      <hr />
      <Icketang username="雨夜清荷">
      {user => user ? <Info user={user} />:<Loading />}
      </Icketang>
      {/* 自定义Hook 的一些demo */}
      <hr />
      <HookDemo/>
      <hr />
      <UseContextDemo/>
    </div>  
  )
})


export default Demo